﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

using Corsat.Library.Logic;

namespace Corsat.Desktop.UserControls
{
    public partial class ucProfile : UserControl
    {
        public ucProfile()
        {
            InitializeComponent();

        }

        Account account = new Account();

        public ucProfile(int AccountId)
        {
            account = new Account(AccountId);
            InitializeComponent();
            tbArabicName.Text = account.ArabicName;
            tbDay.Text = account.BirthDate.Day.ToString();
            tbYear.Text = account.BirthDate.Year.ToString();
            tbEmail.Text = account.Email;
            tbSSN.Text = account.SSN;
            chkIsOnlineRegistered.Checked = account.IsOnlineRegistered;


        }

        private void ucProfile_Load(object sender, EventArgs e)
        {
            pnlTelephones.Controls.Add(new UserControls.SubUserControls.ucTelephone());
            pnlTelephones.Controls.Add(new UserControls.SubUserControls.ucTelephone());
            pnlTelephones.Controls.Add(new UserControls.SubUserControls.ucTelephone());

            pnlCourses.Controls.Add(new UserControls.SubUserControls.ucCourse());
            pnlCourses.Controls.Add(new UserControls.SubUserControls.ucCourse());
            pnlCourses.Controls.Add(new UserControls.SubUserControls.ucCourse());
        }
    }
}
